#ifndef __CONTROL_H
#define __CONTROL_H
#include "sys.h"

#define EcoderToSpeed (3.88/5)      //((100/390)*60)
#define SpeedToEcoder (0.25*5)     //(390/6000)

#define EcoderToPos (0.923/30) // 390/360
#define PosToEcoder (1.083*30) // 360/390
void Set_Pwm(void);
void Xianfu_Pwm(void);
int myabs(int a);
int Incremental_PI (int Encoder,int Target,unsigned char order);
int Position_PID (int Encoder,int Target,unsigned char order);
#endif
